import request from '@/utils/request.js'

// 查询图档中心模型文档列表
export function listDocument(query) {
    return request({
        url: '/drawing/document/page',
        method: 'get',
        params: query
    })
}

// 查询图档中心模型文档详细
export function getDocument(id) {
    return request({
        url: '/drawing/document/getInfo?id=' + id,
        method: 'get'
    })
}

//区域查询
export function regionTree() {
    return request({
        url: '/drawing/region/tree',
        method: 'get'
    })
}

// 新增图档中心模型文档
export function addDocument(data) {
    return request({
        url: '/drawing/document/add',
        method: 'post',
        data: data
    })
}

// 修改图档中心模型文档
export function updateDocument(data) {
    return request({
        url: '/drawing/document/update',
        method: 'put',
        data: data
    })
}

// 删除图档中心模型文档
export function delDocument(id) {
    return request({
        url: '/drawing/document/remove?id=' + id,
        method: 'delete'
    })
}
